{% args info, advanced %}
      <form  method='post'>
         <table>
            <TR>
               <TD colspan='2'>
                  <h2>Advanced Settings</h2>
            <TR>
               <TD colspan='2'>
                  <h3>Menu Settings</h3>
            <TR>
               <TD>Scripts:
               <TD><input type=checkbox id='scripts' name='scripts' {% if advanced['scripts'] == 'on' %}checked{% endif %}>
            <TR>
               <TD>Rules:
               <TD><input type=checkbox id='rules' name='rules' {% if advanced['rules'] == 'on' %}checked{% endif %}>
            <TR>
               <TD>Notifications:
               <TD><input type=checkbox id='notifications' name='notifications' {% if advanced['notifications'] == 'on' %}checked{% endif %}>
            <TR>
               <TD colspan='2'>
                  <h3>Controller Settings</h3>
            <TR>
               <TD>MQTT Retain Msg:
               <TD><input type=checkbox id='mqttretain' name='mqttretain' {% if advanced['mqttretain'] == 'on' %}checked{% endif %}>
            <TR>
               <TD>Message Delay:
               <TD><input type='number' name='messagedelay' min=0 style='width:5em;' value={{advanced['messagedelay']}}> [ms]
            <TR>
               <TD colspan='2'>
                  <h3>NTP Settings</h3>
            <TR>
               <TD>NTP Hostname:
               <TD><input type='text' name='ntphostname' maxlength=63 value='{{advanced['ntphostname']}}'>
            <TR>
               <TD>Timezone Offset:
               <TD><input type='number' name='ntptimezone' min=-43200 max=43200 style='width:5em;' value={{advanced['ntptimezone']}}> [minutes]
            <TR>
               <TD>DST:
               <TD><input type=checkbox id='ntpdst' name='ntpdst' {% if advanced['ntpdst'] == 'on' %}checked{% endif %}>
            <TR>
               <TD colspan='2'>
                  <h3>Log Settings</h3>
            <TR>
               <TD>Syslog IP:
               <TD><input type='text' name='sysloghostname' value='{{advanced['sysloghostname']}}'>
            <TR>
               <TD>Syslog Level:
               <TD><select name='sysloglevel'>
                   <option value='5' {% if advanced['sysloglevel'] == 5 %}selected{% endif %}>Off</option>
                   <option value='1' {% if advanced['sysloglevel'] == 1 %}selected{% endif %}>Debug</option>
                   <option value='2' {% if advanced['sysloglevel'] == 2 %}selected{% endif %}>Info</option>
                   <option value='3' {% if advanced['sysloglevel'] == 3 %}selected{% endif %}>Warning</option>
                   <option value='4' {% if advanced['sysloglevel'] == 4 %}selected{% endif %}>Error</option>
                </select>
            <TR>
               <TD>Serial log Level:
               <TD><select name='serialloglevel'>
                   <option value='5' {% if advanced['serialloglevel'] == 5 %}selected{% endif %}>Off</option>
                   <option value='1' {% if advanced['serialloglevel'] == 1 %}selected{% endif %}>Debug</option>
                   <option value='2' {% if advanced['serialloglevel'] == 2 %}selected{% endif %}>Info</option>
                   <option value='3' {% if advanced['serialloglevel'] == 3 %}selected{% endif %}>Warning</option>
                   <option value='4' {% if advanced['serialloglevel'] == 4 %}selected{% endif %}>Error</option>
                </select>
            <TR>
               <TD>Web log Level:
               <TD><select name='webloglevel'>
                   <option value='5' {% if advanced['webloglevel'] == 5 %}selected{% endif %}>Off</option>
                   <option value='1' {% if advanced['webloglevel'] == 1 %}selected{% endif %}>Debug</option>
                   <option value='2' {% if advanced['webloglevel'] == 2 %}selected{% endif %}>Info</option>
                   <option value='3' {% if advanced['webloglevel'] == 3 %}selected{% endif %}>Warning</option>
                   <option value='4' {% if advanced['webloglevel'] == 4 %}selected{% endif %}>Error</option>
                </select>
            <TR>
               <TD>SD Card Value Logger:
               <TD><input type=checkbox id='enablesdlog' name='enablesdlog' {% if advanced['enablesdlog'] == 'on' %}checked{% endif %}>
            <TR>
               <TD>SD Card log Level:
               <TD><select name='sdloglevel'>
                   <option value='0' {% if advanced['sdloglevel'] == 5 %}selected{% endif %}>Off</option>
                   <option value='1' {% if advanced['sdloglevel'] == 1 %}selected{% endif %}>Debug</option>
                   <option value='2' {% if advanced['sdloglevel'] == 2 %}selected{% endif %}>Info</option>
                   <option value='3' {% if advanced['sdloglevel'] == 3 %}selected{% endif %}>Warning</option>
                   <option value='4' {% if advanced['sdloglevel'] == 4 %}selected{% endif %}>Error</option>
                </select>
            <TR>
               <TD colspan='2'>
                  <h3>Serial Settings</h3>
            <TR>
               <TD>Enable Serial port:
               <TD><input type=checkbox id='enableserial' name='enableserial' {% if advanced['enableserial'] == 'on' %}checked{% endif %}>
            <TR>
               <TD>Baud Rate:
               <TD><input type='number' name='serialbaudrate' min=0 max=1000000 style='width:5em;' value={{advanced['serialbaudrate']}}>
            <TR>
               <TD colspan='2'>
                  <h3>Inter-ESPEasy Network (experimental)</h3>
            <TR>
               <TD>Global Sync:
               <TD><input type=checkbox id='enablesync' name='enablesync' {% if advanced['enablesync'] == 'on' %}checked{% endif %}>
            <TR>
               <TD>UDP port:
               <TD><input type='number' name='syncport' min=0 max=65535 style='width:5em;' value={{advanced['syncport']}}>
            <TR>
               <TD colspan='2'>
                  <h3>Special and Experimental Settings</h3>
            <TR>
               <TD>Fixed IP Octet:
               <TD><input type='number' name='fixedipoctet' min=0 max=255 style='width:5em;' value={{advanced['fixedipoctet']}}>
            <TR>
               <TD>WD I2C Address:
               <TD><input type='number' name='wdi2caddress' min=0 max=127 style='width:5em;' value={{advanced['wdi2caddress']}}> (decimal)
            <TR>
               <TD>Use SSDP:
               <TD><input type=checkbox id='usessdp' name='usessdp' {% if advanced['usessdp'] == 'on' %}checked{% endif %}>
            <TR>
               <TD>Connection Failure Threshold:
               <TD><input type='number' name='connectfailure' min=0 max=100 style='width:5em;' value={{advanced['connectfailure']}}>
            <TR>
               <TD>I2C ClockStretchLimit:
               <TD><input type='number' name='i2cstretchlimit' style='width:5em;' value={{advanced['i2cstretchlimit']}}>
            <TR>
               <TD colspan='2'>
                  <hr>
            <TR>
               <TD>
               <TD><input class='button link' type='submit' value='Submit'>
         </table>
      </form>
